package cn.yuanqiao.archive.archiveFormSave.service;

import cn.yuanqiao.archive.archiveFormSave.domain.YqdaArchiveForm;
import org.apache.commons.compress.archivers.ArchiveException;

import java.util.List;
import java.util.Map;

/**
 * 归档申请单Service接口
 * 
 * @author yuanqiao
 * @date 2023-07-26
 */
public interface IYqdaArchiveFormService 
{
    /**
     * 查询归档申请单
     * 
     * @param formId 归档申请单主键
     * @return 归档申请单
     */
    public YqdaArchiveForm selectYqdaArchiveFormByFormId(String formId);

    /**
     * 查询归档申请单列表
     * 
     * @param yqdaArchiveForm 归档申请单
     * @return 归档申请单集合
     */
    public List<YqdaArchiveForm> selectYqdaArchiveFormList(YqdaArchiveForm yqdaArchiveForm);

    /**
     * 新增归档申请单
     * 
     * @param yqdaArchiveForm 归档申请单
     * @return 结果
     */
    public int insertYqdaArchiveForm(YqdaArchiveForm yqdaArchiveForm);

    /**
     * 修改归档申请单
     * 
     * @param yqdaArchiveForm 归档申请单
     * @return 结果
     */
    public int updateYqdaArchiveForm(YqdaArchiveForm yqdaArchiveForm);

    /**
     * 批量删除归档申请单
     * 
     * @param formIds 需要删除的归档申请单主键集合
     * @return 结果
     */
    public int deleteYqdaArchiveFormByFormIds(String[] formIds);

    /**
     * 删除归档申请单信息
     * 
     * @param formId 归档申请单主键
     * @return 结果
     */
    public int deleteYqdaArchiveFormByFormId(String formId);

    int batchInsertYqdaArchiveForm(List<YqdaArchiveForm> yqdaArchiveForms);

    List<Map<String, Object>> getArchiveInfo(YqdaArchiveForm yqdaArchiveForm,String commonCloumns,String level) throws ArchiveException;

    String getCommonColumns ();

    List<Map<String, Object>> getArchiveListByArchiveForm(YqdaArchiveForm yqdaArchiveForm);

    List<Map<String, Object>> getArchiveListByArchiveCategory(YqdaArchiveForm yqdaArchiveForm);

    List<Map<String, Object>> getArchiveListByCategoryAndIds(String[] archiveIds,Long categoryId,String daType);

    Map<String, Object> getArchiveSaveDownloadTitle (Long categoryId, Long[] archiveIds, String daType);

    boolean checkArchiveIsAddForm(List<YqdaArchiveForm> yqdaArchiveForms);

    int updateYqArchiveState(List<YqdaArchiveForm> yqdaArchiveForms,int state);

    List<YqdaArchiveForm> selectYqdaArchiveFormsByFormIds(String[] formIds);

    boolean checkArchiveUserCategoryForm(List<YqdaArchiveForm> yqdaArchiveForms);

    List<Map<String, Object>> getArchiveListByArchiveFormList(List<YqdaArchiveForm> yqdaArchiveForms);

    int batchUpdateByArchiveIdsAndUserId(YqdaArchiveForm yqdaArchiveForm);

    int batchUpdateByArchiveIds(YqdaArchiveForm yqdaArchiveForm);

    List<YqdaArchiveForm> selectYqdaArchiveFormsByArchiveIds(String[] archiveIds);

    int deleteYqdaArchiveFormByArchiveIdsAndUserId(String[] archiveIds, Long userId);

    Map<String, Object> getArchiveTotal(String daType,List<String> archiveIds);
}
